/**
 * 
 */
package ccrClasses.layer1.immunizations;

import ccrClasses.ICcr;
import ccrClasses.layer2.DateTime;
import ccrClasses.layer2.Product;
import ccrClasses.layer2.Source;

/**
 * @author matheus
 *
 */
public class Immunization implements ICcr {
	
	public final static String OPEN_TAG = "<Immunization>";

	public final static String CLOSE_TAG = "</Immunization>";
	
	private DateTime startDateTime;
	
	private DateTime stopDateTime;
	
	private Source source;
	
	private Product product;
	
	/* (non-Javadoc)
	 * @see ccrClasses.ICcr#constructCcrString()
	 */
	@Override
	public String constructCcrString() {
		String ccrAlert = OPEN_TAG;
		
		if (this.startDateTime != null) {
			ccrAlert = ccrAlert + this.startDateTime.constructCcrString();
		}

		if (this.stopDateTime != null) {
			ccrAlert = ccrAlert + this.stopDateTime.constructCcrString();
		}		

		if (this.source != null) {
			ccrAlert = ccrAlert + this.source.constructCcrString();
		}		

		if (this.product != null) {
			ccrAlert = ccrAlert + this.product.constructCcrString();
		}
			
		ccrAlert = ccrAlert + CLOSE_TAG;
		
		return ccrAlert;
	}

	/**
	 * @return the startDateTime
	 */
	public DateTime getStartDateTime() {
		return startDateTime;
	}

	/**
	 * @param startDateTime the startDateTime to set
	 */
	public void setStartDateTime(DateTime startDateTime) {
		this.startDateTime = startDateTime;
	}

	/**
	 * @return the stopDateTime
	 */
	public DateTime getStopDateTime() {
		return stopDateTime;
	}

	/**
	 * @param stopDateTime the stopDateTime to set
	 */
	public void setStopDateTime(DateTime stopDateTime) {
		this.stopDateTime = stopDateTime;
	}

	/**
	 * @return the source
	 */
	public Source getSource() {
		return source;
	}

	/**
	 * @param source the source to set
	 */
	public void setSource(Source source) {
		this.source = source;
	}

	/**
	 * @return the product
	 */
	public Product getProduct() {
		return product;
	}

	/**
	 * @param product the product to set
	 */
	public void setProduct(Product product) {
		this.product = product;
	}

}
